package com.work.dto.builder;

import java.util.Date;

import com.work.dto.RoleDto;
import com.work.model.builder.Builder;

/**
 * The Class RoleDtoBuilder.
 *
 * @author "Mihai Roman"
 */
public class RoleDtoBuilder extends Builder<RoleDto> {

	/**
	 * With created by.
	 *
	 * @param dtoCreatedBy the dto created by
	 * @return the role dto builder
	 */
	private RoleDtoBuilder withCreatedBy(int dtoCreatedBy) {
		build().setDtoCreatedBy(dtoCreatedBy);
		return this;
	}
	
	/**
	 * With creation date.
	 *
	 * @param dtoCreationDate the dto creation date
	 * @return the role dto builder
	 */
	private RoleDtoBuilder withCreationDate(Date dtoCreationDate) {
		build().setDtoCreationDate(dtoCreationDate);
		return this;
	}
	
	/**
	 * With name.
	 *
	 * @param dtoName the dto name
	 * @return the role dto builder
	 */
	private RoleDtoBuilder withName(String dtoName) {
		build().setDtoName(dtoName);
		return this;
	}
	
	/**
	 * With updated by.
	 *
	 * @param dtoUpdatedBy the dto updated by
	 * @return the role dto builder
	 */
	private RoleDtoBuilder withUpdatedBy(int dtoUpdatedBy) {
		build().setDtoUpdatedBy(dtoUpdatedBy);
		return this;
	}
	
	/**
	 * With updated date.
	 *
	 * @param dtoUpdatedDate the dto updated date
	 * @return the role dto builder
	 */
	private RoleDtoBuilder withUpdatedDate(Date dtoUpdatedDate) {
		build().setDtoUpdatedDate(dtoUpdatedDate);
		return this;
	}
	
	/**
	 * With id roles.
	 *
	 * @param dtoIdRoles the dto id roles
	 * @return the role dto builder
	 */
	private RoleDtoBuilder withIdRoles(int dtoIdRoles) {
		build().setDtoIdRoles(dtoIdRoles);
		return this;
	}
	
	/**
	 * A role.
	 *
	 * @param dtoCreatedBy the dto created by
	 * @param dtoCreationDate the dto creation date
	 * @param dtoName the dto name
	 * @param dtoUpdatedBy the dto updated by
	 * @param dtoUpdatedDate the dto updated date
	 * @return the role dto
	 */
	public RoleDto aRole(int dtoCreatedBy, Date dtoCreationDate, String dtoName, int dtoUpdatedBy, Date dtoUpdatedDate) {
		this.withCreatedBy(dtoCreatedBy);
		this.withCreationDate(dtoCreationDate);
		this.withName(dtoName);
		this.withUpdatedBy(dtoUpdatedBy);
		this.withUpdatedDate(dtoUpdatedDate);
		return this.build();
	}
	
	/**
	 * A role.
	 *
	 * @param dtoCreatedBy the dto created by
	 * @param dtoCreationDate the dto creation date
	 * @param dtoName the dto name
	 * @param dtoUpdatedBy the dto updated by
	 * @param dtoUpdatedDate the dto updated date
	 * @param dtoIdRoles the dto id roles
	 * @return the role dto
	 */
	public RoleDto aRole(int dtoCreatedBy, Date dtoCreationDate, String dtoName, int dtoUpdatedBy, Date dtoUpdatedDate, int dtoIdRoles) {
		this.withCreatedBy(dtoCreatedBy);
		this.withCreationDate(dtoCreationDate);
		this.withName(dtoName);
		this.withUpdatedBy(dtoUpdatedBy);
		this.withUpdatedDate(dtoUpdatedDate);
		this.withIdRoles(dtoIdRoles);
		return this.build();
	}
	
}
